package com.yike.user.service;

import com.yike.user.entity.Machine;
import com.yike.user.param.BandMachineParam;
import com.yike.user.param.InitMachineParam;
import com.yike.user.param.MachinePageParam;
import com.yike.common.base.BaseService;
import com.yike.common.pagination.Paging;
import com.yike.common.vo.MachineVo;

/**
 * 设备表 服务类
 *
 * @author yike
 * @since 2024-07-19
 */
public interface MachineService extends BaseService<Machine> {

    /**
     * 保存
     *
     * @param machine
     * @return
     * @throws Exception
     */
    boolean saveMachine(Machine machine) throws Exception;

    /**
     * 修改
     *
     * @param machine
     * @return
     * @throws Exception
     */
    boolean updateMachine(Machine machine) throws Exception;

    /**
     * 删除
     *
     * @param id
     * @return
     * @throws Exception
     */
    boolean deleteMachine(Long id) throws Exception;


    /**
     * 获取分页对象
     *
     * @param machinePageParam
     * @return
     * @throws Exception
     */
    Paging<Machine> getMachinePageList(MachinePageParam machinePageParam) throws Exception;

    /**
     * 设备初始查询
     *
     * @param machine
     * @return
     */
    MachineVo init(InitMachineParam machine);

    /**
     * 设备绑定
     *
     * @param band
     */
    void band(BandMachineParam band);
}
